import request from '@/http/request'
import QueryString from 'qs'
export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data,
  })
}

export function login1(data) {
  return request({
    url: '/teacher/login',
    method: 'post',
    data,
  })
}

export function register(data) {
  return request({
    url: '/user/register',
    method: 'post',
    data
  })
}






export function getLogout(data) {
  return request({
    url: '/api/logout',
    method: 'post',
    data
  })
}


export function getUserList(data) {
  return request({
    url: '/user/list/page/vo',
    method: 'post',
    data
  })
}


export function getUserDelete(data) {
  return request({
    url: '/user/delete',
    method: 'post',
    data
  })
}
// 10  管理员删除课程
export function getGuanliStudentDelete(data) {
  return request({
    url: '/course/delete',
    method: 'post',
    data
  })
}
// 4 管理员删除用户
export function getGuanliStudentDeleteS(data) {
  return request({
    url: '/user/delete',
    method: 'post',
    data
  })
}
// 4 管理员更新用户
export function getGuanliSUp(data) {
  return request({
    url: '/user/update',
    method: 'post',
    data
  })
}
export function getUserLogout(data) {
  return request({
    url: '/user/logout',
    method: 'post',
    data
  })
}

export function getUserUpdate(data) {
  return request({
    url: '/user/update',
    method: 'post',
    data
  })
}
//学生修改自己的信息
export function getUserUpdateMy(data) {
  return request({
    url: '/user/update/my',
    method: 'post',
    data
  })
}
//老师修改自己的信息
export function getTeachUpdateMy(data) {
  return request({
    url: '/teacher/update',
    method: 'post',
    data
  })
}

//管理员修改自己的信息
export function getGuanliyuanUpdateMy(data) {
  return request({
    url: '/user/update/my',
    method: 'post',
    data
  })
}

// 学生获取登录信息
export function getUserId(data) {
  return request({
    url: `user/get/login`,
  })
}
// 老师获取登录信息
export function getTeacherId(data) {
  return request({
    url: `/teacher/get/login`,
    method: 'get',
  })
}
// 10 三端 获取登录信息
export function getThreeDuaId(data) {
  return request({
    url: `/user/get/login`,
    method: 'get',
  })
}

// 3 管理员  删除教室资源管理请求
export function getGuanDeleteClass(data) {
  return request({
    url: '/resource/delete',
    method: 'post',
    data
  })
}

// 10  管理员 删除 学科
export function getZiYuanReturn(data) {
  return request({
    url: '/subject/delete',
    method: 'post',
    data
  })
}
// 归还时间

export function getGuiHuan(data) {
  return request({
    url: '/bookBorrow/update',
    method: 'post',
    data
  })
}
// 10 管理员删除失物招领
export function getGuanDeleteGreade(data) {
  return request({
    url: '/lost/delete',
    method: 'post',
    data
  })
}
